<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" charset="utf-8">
        var key = 10;
        //this对象是指在运行时期基于执行环境所绑定的
        //this对象总是指向调用者
        function test() {
            //局部作用域
            this.key = 20;
        }
        window.test();
        //alert(window.key);
        alert(key);
    </script>
</head>
<body>
</body>
</html>